import axios from 'axios'

const $http = axios.create({
    baseURL: 'http://localhost:3006',
    timeout: 1000,
    headers: { 'X-Custom-Header': 'foobar' }
})

$http.interceptors.request.use(config => {
    return config
}, error => {
    return Promise.reject(error)
})

$http.interceptors.response.use(response => {
    return response.data
}, error => {
    return Promise.reject(error)
})

export default $http



